/**
 * Implementacion de la clase ControlMapObject
 */


#include "controlMapObject.hpp"

ControlMapObject::ControlMapObject() {

}

ControlMapObject::~ControlMapObject() {

}

std::string ControlMapObject::getMapObjectId()
{
	return this->moId;
}

void ControlMapObject::setMapObjectId(std::string id)
{
	this->moId.clear();
	this->moId = id;
	this->status[0] = 1;
}

std::string ControlMapObject::getEdgeId()
{
	return this->edgeId;
}

void ControlMapObject::setEdgeId(std::string edgeId)
{
	this->edgeId.clear();
	this->edgeId = edgeId;
	this->status[1] = 1;
}

int ControlMapObject::getHeight()
{
	return this->height;
}

void ControlMapObject::setHeight(int alt)
{
	this->height = alt;
	this->status[2] = 1;
}

ObjectType ControlMapObject::getType()
{
	return this->type;
}

void ControlMapObject::setType(ObjectType type)
{
	this->type = type;
	this->status[3] = 1;
}

int ControlMapObject::getMapObjectIdStatus()
{
	return this->status[0];
}

int ControlMapObject::getEdgeIdStatus()
{
	return this->status[1];
}

int ControlMapObject::getHeightStatus()
{
	return this->status[2];
}

int ControlMapObject::getTypeStatus()
{
	return this->status[3];
}

int ControlMapObject::getNumberOfFieldsStatus()
{
	return this->status[4];
}

void ControlMapObject::setFailStatus(int fieldNumber)
{
	this->status[fieldNumber-1] = 0;
}

void ControlMapObject::setSuccessStatus(int fieldNumber)
{
	this->status[fieldNumber-1] = 1;
}

void ControlMapObject::clear()
{
	this->moId.clear();
	this->edgeId.clear();
	this->height = 0;
	this->type = HOTEL;
	for (int i = 0; i < MAPOBJECT_STATUS_LEN; i++)
	{
		this->status[i] = 0;
	}
}
